//package com.xiaowei.aidemo1.controller;
//
//import com.xiaowei.aidemo1.utils.AiUtils;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.multipart.MultipartFile;
//
//import java.io.IOException;
//
//@RestController
//@CrossOrigin
//public class AiController {
//
//    @RequestMapping(value = "/pic",method = RequestMethod.POST)
//    public String PicToWord(@RequestParam("file") MultipartFile file) throws IOException {
//        String res = AiUtils.picToWords(file);
//        System.out.println(res);
//        return res;
//    }
//
//    @RequestMapping(value = "/img",method = RequestMethod.POST)
//    public String imgToWord(@RequestParam("file") MultipartFile file) throws IOException {
//        String res = AiUtils.imgRecognition(file);
//        System.out.println(res);
//        return res;
//    }
//
//    @RequestMapping(value = "/correction",method = RequestMethod.GET)
//    public String imgToWord(@RequestParam("text") String text){
//        System.out.println(text);
//        String res = AiUtils.correction(text);
//        System.out.println(res);
//        return res;
//    }
//
//}
